import { StoreHouse } from "./stack"

class Tools {
    handleStack = new StoreHouse();
    restoreHandleStack = new StoreHouse();
    constructor() { }
    random(n?: number) {
        let len = n || 8
        let $chars = 'abcdefghijklmnopqrstuvwmnz'
        let maxPos = $chars.length
        let id = ''
        for (let i = 0; i < len; i++) {
            id += $chars.charAt(Math.floor(Math.random() * maxPos))
        }
        return id
    }
}

export const tools = new Tools()